<?php global $base_url?>
<!-- #header -->
<?php hkfanr_cms_over_ad();?>
<div id="header">
	<!-- #header-inside -->
    <div id="header-inside" class="container_12 clearfix">
    	<!-- #header-inside-left -->
        <div id="header-inside-left" class="grid_1">
            <a href="<?php print check_url($front_page); ?>" title="<?php print t('Home'); ?>"><img src="<?php print $logo; ?>" alt="<?php print t('Home'); ?>" /></a>
        </div><!-- EOF: #header-inside-left -->
        <div id="header-inside-middle" class="grid_7">
            <div id="navigation" class="clearfix">
            <?php 
            $main_menu_tree = menu_tree(variable_get('menu_main_links_source', 'main-menu')); 
            print drupal_render($main_menu_tree);
            ?>
            </div>
        </div><!-- EOF: #header-inside-middle -->
        <!-- #header-inside-right -->    
        <div id="header-inside-right" class="grid_3">
            <?php print render($page['search_area']); ?>
        </div><!-- EOF: #header-inside-right -->
        <div id="header-inside-end" class="grid_2">
            <?php hkfanr_cms_user_menu_alter();?>
        </div><!-- EOF: #header-inside-end -->
    </div><!-- EOF: #header-inside -->
</div><!-- EOF: #header -->
<!-- #content -->
<div id="content">
    <!-- #content-inside -->
    <div id="content-inside" class="container_12 clearfix">
        <div id="main" class="grid_8">
            <?php if ($messages): ?>
            <div id="console" class="clearfix">
            <?php print $messages; ?>
            </div>
            <?php endif; ?>
            <?php 
            $term = field_view_field('node', $node, 'field_category', array('default'));
            $node_author = user_load($node->uid);
            print '<div class="page_title_box"><span class="page_title">'.$title.'</span></div>';
            print '<div class="node_info_box">
                <ul>
                    <li class="node_info_item node_info_item_first">'.$term['#object']->field_category['und'][0]['taxonomy_term']->name.'</li>
                    <li class="node_info_item">'.$node_author->name.'</li>
                    <li class="node_info_item">'.format_date($node->created,'small').'</li>
                </ul>
                </div>';
            if($tabs){
                print render($tabs);
            }
            print render($page['content']);
            ?>
        </div>
        <div id="sidebar-second" class="grid_4">
            <?php print render($page['sidebar_second']); ?>
            <div class="sider_block">
                <table class="recommend_title_box">
                    <tr>
                        <td>
                            <div class="recommend_title_box_title">
                                <span class="recommend_title_box_title_span">作者</span>
                            </div>
                        </td>
                        <td>
                            <div class="recommend_title_box_more">
                                关注作者
                                <img class ="refresh_img"
                                    src="<?php print $base_url.'/'.drupal_get_path('theme', 'hkfanr_theme') ;?>/images/icon/follow_off.png"
                                    alt="follow"/>
                            </div>
                        </td>
                    </tr>
                </table>
                <div class="side_block_content">
                    <div class="author_pic">
                        <img class ="author_pic_img"
                            src="<?php print $base_url.'/'.drupal_get_path('theme', 'hkfanr_theme');?>/images/icon/group_avater.png"
                            alt="group avater"/>
                        <img class ="author_pic_img_avater"
                            src="<?php print $base_url;?>/sites/default/files/shop/shop_1.png"
                            alt="Avater"/>
                    </div> 
                    <div class="author_info">
                        <div class="author_name"><?php echo $node_author->name;?></div>
                        <div class="author_descript">作者介绍</div>
                    </div> 
                    <div class="author_other_article_title">
                        作者其他文章
                    </div>
                    <div class="sider_block_list_content">
                        <ul>
                            <?php
                            $hot_group_arr = array(1,2,3);
                            foreach ($hot_group_arr as $key => $value) {
                            ?>
                                <li class="sider_block_list_item">
                                    <a href="#">花落人独立微雨念双飞</a>
                                </li>
                            <?php
                            }
                            ?>
                        </ul>
                    </div>
                </div>
            </div>
            <div class="sider_block">
                <table class="recommend_title_box">
                    <tr>
                        <td>
                            <div class="recommend_title_box_title">
                                <span class="recommend_title_box_title_span">相关文章</span>
                            </div>
                        </td>
                    </tr>
                </table>
                <div class="sider_block_list_content">
                    <ul>
                        <?php
                        $hot_group_arr = array(1,2,3,4);
                        foreach ($hot_group_arr as $key => $value) {
                        ?>
                            <li class="sider_block_list_item">
                                <a href="#">花落人独立微雨念双飞</a>
                            </li>
                        <?php
                        }
                        ?>
                    </ul>
                </div>
            </div>
        </div><!-- EOF: #sidebar-second -->
    </div><!-- EOF: #content-inside -->

</div><!-- EOF: #content -->

<!-- #footer -->    
<div id="footer">
	<!-- #footer-inside -->
    <div id="footer-inside" class="container_12 clearfix">
        <div class="powered-by">
            @ 2014 HKfanr
        </div>
        <div class="footer-area grid_7">
            <ul class="footer-menu-1">
                <?php hkfanr_cms_footer_menu(1);?>
            </ul>
        </div><!-- EOF: .footer-area -->
        <div class="footer-area grid_4">
            <ul class="footer-menu-2">
                <?php hkfanr_cms_footer_menu(2);?>
            </ul>
        </div><!-- EOF: .footer-area -->
    </div><!-- EOF: #footer-inside -->

</div><!-- EOF: #footer -->
